<template>
  <iconfont :name="fontClass" :size="iconSize" :fill="color"></iconfont>
</template>

<script>
import iconfont from 'iconfont/iconfont.vue'

export default {
  name: "ali-icon",
  components: {
    iconfont
  },
  props: {
    font: {type: String, default: 'icon-Givecashbag'},
    size: {type: String, default: '16'},
    color: {type: String}
  },
  computed: {
    fontClass() {
      return this.font.split("-")[1]
    },
    iconSize() {
      return this.size + 'px'
    }
  }
}
</script>

<style scoped>
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>
